package cn.cmcc.online.smsapi.ui.util;

import android.graphics.drawable.GradientDrawable;

/**
 * Created by HAO on 2017/1/9.
 */

public class BackgroundShapeUtils {
    /**
     * 产生shape类型的drawable
     *
     * @param solidColor
     * @param strokeColor
     * @param strokeWidth
     * @param radii
     * @return
     */
    public static GradientDrawable getBackgroundDrawable(int solidColor, int strokeColor, int strokeWidth, float[] radii) {
        GradientDrawable drawable = new GradientDrawable();
        drawable.setColor(solidColor);
        drawable.setStroke(strokeWidth, strokeColor);
        drawable.setCornerRadii(radii);
        return drawable;
    }


}
